package com.kaifamiao.io.d0922;

import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriterDemo {

    public static void main(String[] args) {
        String path = "d:/io/writer.txt";
        try (FileWriter writer = new FileWriter(path);){


            writer.write("你不好");
            writer.write("\r\n");
            writer.write("abc");

            // 编码 ? utf-8
            // 内容
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
